#!/bin/sh -e

export CFLAGS="$CFLAGS -fPIC"

for patch in readline80-00*; do
    patch -p0 < "$patch"
done

./configure \
    --prefix=/usr

make SHLIB_LIBS=-lncurses
make DESTDIR="$1" install
